<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>申请团队</title>
<link rel="stylesheet" href="__ROOT__/Public/mcss/css.css">
<style type="text/css">
    .bianji{width: 94%;padding:0 3%;height: 50px;line-height: 50px;}
    .bianji1{width: 94%;padding:0 3%;height: 70px;line-height: 70px;}
    .bianji_p1{float: left;}
    .bianji_i1{font-size:14px;color:#a6b2be;float: right;margin-left: 6px;}
    .bianji_p2{float: right;color: #647686;height: 50px;line-height: 50px;width: 50%;text-align: right;}
    .bianji_img1{width: 50px;height: 50px;border-radius: 100%;float: right;margin: 10px 0}
    .register_d{font-size: 15px;}
	.zhezhao_boxa{width: 100%;height: 100%;position: fixed;top: 0;left: 0;display: none;}
    .opentca img{border-radius: 5px;position: fixed;top: 50%;margin-top: -60px;left: 50%;margin-left:-30px;opacity: 0.6;}
    .zhezhao_boxb{width: 100%;height: 100%;position: fixed;top: 0;left: 0;display: none;background: rgba(0,0,0,0.5);}
    .opentcb{width: 70%;padding: 30px 5% 20px;background: #fff;border-radius: 5px;position: relative;left: 10%;top: 50%;margin-top: -100px;overflow: hidden;text-align: center;}
    .opentcb_p1{font-size: 13px;font-size: 16px;text-align: center;}
    .opentcb_divl{font-size: 14px; width: 50%;height: 44px;line-height: 44px;position: absolute; bottom: 0;left: 0;border-top: 1px solid #f4f7f9;}
    .opentcb_divr{font-size: 14px; width: 50%;height: 44px;line-height: 44px;position: absolute; bottom: 0;right: 0;background: #008ae0;color: #fff;}
    .opentcb_divc{font-size: 14px; width: 100%;height: 44px;line-height: 44px;position: absolute; bottom: 0;right: 0;background: #008ae0;color: #fff;}
    .zhezhao_boxc{width: 100%;height: 100%;position: fixed;top: 0;left: 0;display: none;}
    .opentcc{background: rgba(0,0,0,0.7);width: 50%;padding: 20px 2%;font-size: 14px;color: #fff;text-align: center;border-radius: 5px;position: fixed;left: 23%;top: 50%;margin-top: -50px;}
    .opentcd{width: 70%;padding: 7% 5% 20px;background: #fff;border-radius: 5px;position: relative;left: 10%;top: 50%;margin-top: -100px;text-align: center;}
    .opentcd_p1{font-size: 13px;font-size: 16px;text-align: center;}
    .opentcd_divc{font-size: 14px; width: 100%;height: 44px;line-height: 44px;position: absolute; bottom: 0;right: 0;background: #ff4453;color: #fff;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;}
    .opentcd_divcc{font-size: 14px; width: 100%;height: 44px;line-height: 44px;position: absolute; bottom: 0;right: 0;background: #7a7ae7;color: #fff;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;}
    .zhezhao_boxd{width: 100%;height: 100%;position: fixed;top: 0;left: 0;display: none;background: rgba(0,0,0,0.5);}
    .opentcd_img{width: 40%;position: absolute;top: -35%;left: 30%;}
    .order_fj_check {position: absolute;display: inline-block;width: 20px;height: 20px;background: #ccc;border-radius: 20px;left: 8px;right: auto;}
	.order_fj_check::after {content: "";position: absolute;left: 4px;top: 5px;width: 50%;height: 25%;border: 2px solid #fff;border-radius: 0;border-top: none;border-right: none;background: transparent;transform: rotate(-45deg);}
	.icon-fanhui:before {
	  content: "\e601";
	}
</style>
</head>
<body style="background-color: #c6d8ff;">
	<div class="dtop">
		<div class="dtopl" onclick="location.href=&#39;javascript:history.back();&#39;">
			<img class="dtopl_img" src="__ROOT__/Public/images/back.png"/>
		</div>
		<div class="dtopc">详情介绍</div>
		<div class="dtopr"></div>
	</div>
	<div style="height: 50px;"></div>
	<div class="team_top">
		<img class="team_top_img" src="__ROOT__/Public/images/shenqing.jpg"/>
	</div>
	<div class="teamcon">
		<div class="teamcona">
			<div class="teamconl">姓名</div>
			<div class="teamconr">
				<input class="teamconr1" id="true_name" type="text" placeholder="请输入姓名" value="{$list['true_name']}"/>
			</div>
		</div>
		<div class="teamcona">
			<div class="teamconl">手机号</div>
			<div class="teamconr">
				<input class="teamconr1" id="phone" type="number" placeholder="请输入手机号" value="{$list['phone']}"/>
			</div>
		</div>
		<div class="teamcona">
			<div class="teamconl">备注</div>
			<div class="teamconr" style="height: 100px;">
				<textarea class="teamconr4" id="remark" type="text" placeholder="请输入备注">{$list['remark']}</textarea>
			</div>
		</div>
		<div class="teamcona">
			<div class="teamconl">邀请码</div>
			<div class="teamconr">
				<input class="teamconr1" id="jxscode" type="text" placeholder="请输入邀请码" value="{$jxscode}"/>
			</div>
		</div>
		<?php if($list['status']==1){ ?>
		<div class="team_btn" style="background: #eb9d00;">审核中</div>
		<?php }elseif($list['status']==2){ ?>
		<div class="team_btn" style="background: red;">已拒绝</div>
		<?php }else{ ?>
		<div class="team_btn" id="savebtn">申请加入</div>
		<?php } ?>
		
	</div>
	<div class="teamcon">
		<div class="teamcon_tit">合作优势</div>
		<div class="teamcon_con">
			{$system['content']}
		</div>
	</div>
	<div style="height: 30px;"></div>
	<!-- 提示 -->
	<div class="zhezhao_boxc">
	    <div class="opentcc"><p id="tips_content"></p></div>
	</div>
	<!-- 加载 -->
	<div class="zhezhao_boxa">
	    <div class="opentca"><img style="width: 50px;height: 50px;" src="__ROOT__/Public/images/loading2.gif"></div>
	</div>
	<!-- 提交后弹框 -->
	<div class="zhezhao_boxd" >
	    <div class="opentcd">
	        <!--<div class="opentcd_img"><img src="img/lose.png" width="100%"></div>-->
	        <p class="opentcd_p1"></p>
	        <div style="height:44px;"></div>
	        <div class="opentcd_divcc" onclick="javascript:location.href='{:U('Home/Mobile/Home/my')}'">我知道啦</div>
	    </div>
	</div>
</body>
<script type="text/javascript" src="__ROOT__/Public/js/jquery.min.js" charset="utf-8"></script>
<script>
	$('#savebtn').click(function(){
		var true_name = $('#true_name').val();
		var phone = $('#phone').val();
		var remark = $('#remark').val();
		var jxscode = $('#jxscode').val();
		var is_jxscode = "{$system['is_jxscode']}";
		if(true_name==''){
			$('#tips_content').html('请填写姓名！');
			$('.zhezhao_boxc').show();
			setTimeout(function(){
				$('.zhezhao_boxc').hide();
			},1000);      		
			return;
		}
		var rule = /^1\d{10}$/
		if(phone==''){
		 	$('#tips_content').html('请填写手机号！');
		 	$('.zhezhao_boxc').show();
		 	setTimeout(function(){
		 		$('.zhezhao_boxc').hide();
		 	},1000);      		
		 	return;
		}
		if(!rule.test(phone)){
			$('#tips_content').html('请填写正确的手机号！');
		 	$('.zhezhao_boxc').show();
		 	setTimeout(function(){
		 		$('.zhezhao_boxc').hide();
		 	},1000);      		
		 	return;
		}
		if(is_jxscode==1&&jxscode==''){
			$('#tips_content').html('请填写邀请码！');
			$('.zhezhao_boxc').show();
			setTimeout(function(){
				$('.zhezhao_boxc').hide();
			},1000);      		
			return;
		}
		//显示加载框
	    $(".zhezhao_boxa").show();
		$.ajax({
	        url: "{:U('Home/Mobile/Home/do_apply')}",
	        type : "POST",
	        data :{'true_name':true_name,'phone':phone,'remark':remark,'jxscode':jxscode},
	        dataType:"text",
	        success:function(data){
	        	$('.zhezhao_boxa').hide();
	            if(data=='1'){
					$('.opentcd_p1').html('提交成功！');
					$('.zhezhao_boxd').show();
				}else if(data=='2'){
					$('.opentcd_p1').html('提交失败！');
					$('.zhezhao_boxd').show();
				}
	        }
	    });
	});
</script>
</html>
